//
//  AddCommentRequest.m
//  HONGQIYUN
//
//  Created by 余海华 on 2016/12/23.
//  Copyright © 2016年 Haidi. All rights reserved.
//

#import "AddCommentRequest.h"

@implementation AddCommentRequest {
    
    NSString *_article_id;
    NSString *_userName;
    NSString *_content;
}
-(id) initRequestWithArticlId:(NSString *) article_id andUserName:(NSString *) userName andContent:(NSString*) content {
    
    if (self = [super init]) {
        _article_id = article_id;
        _userName = userName;
        _content = content;
    }
    return self;
}


-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGET;
}

-(NSString *)requestUrl
{
    return @"/tools/getdata.ashx?types=add_comment";
}

-(id)requestArgument
{
    return @{
             @"article_id": [_article_id length]?_article_id:@"",
             @"username": [_userName length]?_userName:@"",
             @"content": [_content length]?_content:@""
             };
}
@end
